//******************************************************
// pp51.java   Author:20172330
// 闰年
//******************************************************

import java.text.DecimalFormat;
import java.util.Scanner;

public class pp51
{
  //----------------------------------------------------
  // 闰年能被4整除且不能被100整除，或者同时被100和
  // 400整除
  //----------------------------------------------------
  public static void main(String []args)
  {
   int year;
   Scanner scan = new Scanner(System.in);

   System.out.print("Enter the number of the year: ");
   year = scan.nextInt();
   
   if (year > 1582)
   {
     if (year % 100 == 0)
     {
      if (year % 400 == 0)
       {
         System.out.println("That year is run nian");
       }
      else
       {
         System.out.println("That year is not run nian");
       }
     }
   
     else 
     {
      if (year % 4 == 0)
       {
         System.out.println("That year is run nian");
       }
      else
       {
         System.out.println("That year is not run nian");
       }
     }
   }
 
   else
   System.out.println("It is false. Because there is not BC");
 }
}

 



  
